package com.gitee.feizns.zxw.service.api.impl;

import com.gitee.feizns.web.domain.page.PageAo;
import com.gitee.feizns.web.domain.page.PageVoRet;
import com.gitee.feizns.web.utils.PageUtils;
import com.gitee.feizns.zxw.domain.pojo.ThemeTourismTravelLine;
import com.gitee.feizns.zxw.domain.portal.ao.theme.tourism.travel.line.ListAo;
import com.gitee.feizns.zxw.domain.portal.vo.theme.tourism.travel.line.DetailsVo;
import com.gitee.feizns.zxw.domain.portal.vo.theme.tourism.travel.line.ListVo;
import com.gitee.feizns.zxw.mapper.portal.ApiThemeTourismTravelLineMapper;
import com.gitee.feizns.zxw.service.api.ApiThemeTourismTravelLineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author feizns
 * @since 2019/9/10
 */
@Service
public class ApiThemeTourismTravelLineServiceImpl implements ApiThemeTourismTravelLineService {

    @Autowired
    private ApiThemeTourismTravelLineMapper apiThemeTourismTravelLineMapper;

    @Override
    public DetailsVo details(Integer id) {
        return new ThemeTourismTravelLine().selectByPk(DetailsVo.class, id);
    }

    @Override
    public PageVoRet<ListVo> list(PageAo page, ListAo ao) {
        return PageUtils.create(page, apiThemeTourismTravelLineMapper.list(page.toRowBounds(), ao));
    }

}
